package cn.niit.letuseatdemo.entity.domain;

import cn.niit.letuseatdemo.entity.groups.AddGroup;
import cn.niit.letuseatdemo.entity.groups.UpdateGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Description:
 * @Author: su_fuming菜品分类实体类
 * @CreateTime： 2022/11/23 16:41
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Classify extends BaseEntity {
    /**
     * 分类id
     */
    @NotNull(message = "ID不能为空", groups = {UpdateGroup.class})
    private Long classifyId;
    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空,请输入!", groups = {AddGroup.class, UpdateGroup.class})
    @Length(min = 2, max = 10, message = "分类名称的长度应该在2-10字符之间", groups = {AddGroup.class, UpdateGroup.class})
    private String classifyName;

    /**
     * 菜品分类介绍
     */
    private String classifyIntroduce;
    /**
     * 商家id
     */
    private Long storeId;

}

